package coco.mcpspringboot.mcp;

import coco.mcpspringboot.Info;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

@Service
public class ParamInfoService {

  List<Info> infos = List.of(
      new Info("1.0.0", "a", "放假啊看见对方拉斯基地"),
      new Info("2.0.0", "b", "阿俄警方i啊就司法局"),
      new Info("3.0.0", "c", "飞机法律看见对方"),
      new Info("3.0.0", "a", "kfjfalsjdfl")
  );

  @Tool(description = "根据参数名称获取参数的信息")
  public List<Info> info(@ToolParam(description = "参数名称") String paramName) {
    return infos.stream().filter(it -> it.name().equals(paramName)).collect(Collectors.toList());
  }
}
